home *** CD-ROM | disk | FTP | other *** search
- package symantec.itools.awt;
-
- import java.applet.Applet;
- import java.applet.AppletContext;
- import java.awt.Component;
- import java.awt.Container;
- import java.awt.Event;
- import java.net.URL;
-
- public class ImageHTMLLink extends ImageButton {
- protected URL url;
- protected AppletContext context;
- protected String frame = null;
-
- public URL getURL() {
- return this.url;
- }
-
- public void setURL(URL var1) {
- this.url = var1;
- this.context = null;
- }
-
- public void setFrame(String var1) {
- this.frame = var1;
- }
-
- public String getFrame() {
- return this.frame;
- }
-
- public boolean action(Event var1, Object var2) {
- if (this.context == null) {
- return false;
- } else {
- if (this.frame != null && this.frame.length() != 0) {
- this.context.showDocument(this.url, this.frame);
- } else {
- this.context.showDocument(this.url);
- }
-
- return true;
- }
- }
-
- public void validate() {
- for(Container var1 = ((Component)this).getParent(); var1 != null; var1 = ((Component)var1).getParent()) {
- if (var1 instanceof Applet) {
- this.setAppletContext(((Applet)var1).getAppletContext());
- return;
- }
- }
-
- }
-
- protected void setAppletContext(AppletContext var1) {
- this.context = var1;
- }
- }
-